#include"EnvironmentSelectionNPlusNMechanism.h"

#include<algorithm>

#include"Evaluation.h"

using namespace std;

vector<Solution> EnvironmentSelectionNPlusNMechanism::Select(const vector<Solution>& parents , const vector<Solution>& children)
{
	vector<Solution> allPeople(parents);
	vector<Solution> answer(parents);
	for(Solution whichChild : children)
	{
		allPeople.push_back(whichChild);
	}
	sort(allPeople.begin() , allPeople.end());
	for(int index = 0 ; index < parents.size() ; ++index)
	{
		answer[index] = allPeople[index];
	}
	return answer;
}